package org.tinygroup.uiml.config;

import java.util.ArrayList;
import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

/**
 * Created by luoguo on 2014/6/30.
 */
@XStreamAlias("properties")
public final class Properties {
	
    @XStreamImplicit
    private List<Property> propertyList = new ArrayList<Property>();

    public void addProperty(Property property) {
        propertyList.add(property);
    }

    public void addProperty(String name, String value) {
        addProperty(new Property(name, value));
    }

    public List<Property> getPropertyList() {
    	if (propertyList == null) {
    		propertyList = new ArrayList<Property>();
		}
        return propertyList;
    }

    public void setPropertyList(List<Property> propertyList) {
        this.propertyList = propertyList;
    }

}
